<?php
require_once(dirname(__FILE__)."/config.php");
if(empty($dopost)) $dopost = '';
$aid = isset($aid) && is_numeric($aid) ? $aid : 0;
$channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1;
if($dopost=="delStow")
{
    CheckRank(0,0);
    $type=empty($type)? 'sys' : trim($type);
    $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "mystow.php" : $_COOKIE['ENV_GOBACK_URL'];
    $dsql->ExecuteNoneQuery("UPDATE #@__member_stow SET `type`='bad' WHERE aid='$aid' AND mid='".$cfg_ml->M_ID."';");

   //更新用户统计
    $row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_stow` WHERE `mid`='".$cfg_ml->M_ID."' ");
    $dsql->ExecuteNoneQuery("UPDATE #@__member_tj SET `stow`='$row[nums]' WHERE `mid`='".$cfg_ml->M_ID."'");
    ShowMsg("成功删除一条收藏记录！",$ENV_GOBACK_URL);
    exit();
}
else if($dopost == 'viewType'){
    //覃小华 收藏的栏目
    $url = GetTypeDeurl($tid);
    header("location: ".$url);
    exit();
}